<template>
	<view style="background-image: url(/static/bg.png);">
		<view class="rf-header-box">
			<view class="rf-header">
				<view style="height: 80rpx;line-height: 80rpx;" class="rf-back" @tap="back">
					<text class="iconfont iconzuo">传统拍摄</text>
				</view>
			</view>
		</view>
		<!-- for -->
		<view v-for="(item,index) in tradilist">
			<view style="display: flex;" @click="gotodetail(item.title)">
				<view>
					<img width="180" :src="item.cover==null?'/static/zwpic.png':item.cover" alt="" srcset="" />
				</view>
				<view>
					<view style="line-height: 60rpx;font-size: 50rpx;font-weight: bold;margin-bottom: 30rpx;">{{item.title}}</view>
					<view>{{item.content}}</view>
				</view>
			</view>
		</view>
		
		
	</view>
</template>

<script>
	const app = getApp();
	import {getAlltra} from "@/api/traditional.js"
	export default {
		data() {
			return {
				tradilist:[]
			}
		},
		onShow(){
			this.initData();
		},
		methods: {
			async initData(){
				const res = await getAlltra();
				this.tradilist = res.data.data;
				console.log(this.tradilist);
			},
			back() {
				if (this.drawer) {
					this.closeDrawer()
				} else {
					// this.$mRouter.back();
				}
			},
			gotodetail(name){
				// this.$store.state.cultureName=name
				// this.$store.state.cultureLimit=true
				uni.switchTab({
					url:'/pages/cart/cart?partition='+name
				})
			}
		}
	}
</script>

<style>

</style>
